import request from '@/utils/request'

// 查询桌子二维码列表
export function listTable(query) {
  return request({
    url: '/shop/table/list',
    method: 'get',
    params: query
  })
}

// 查询桌子二维码详细
export function getTable(tableId) {
  return request({
    url: '/shop/table/' + tableId,
    method: 'get'
  })
}

// 新增桌子二维码
export function addTable(data) {
  return request({
    url: '/shop/table',
    method: 'post',
    data: data
  })
}

// 修改桌子二维码
export function updateTable(data) {
  return request({
    url: '/shop/table',
    method: 'put',
    data: data
  })
}

// 删除桌子二维码
export function delTable(tableId) {
  return request({
    url: '/shop/table/' + tableId,
    method: 'delete'
  })
}
